// vim:ft=javascript

ARG_ENABLE("seaslog", "enable seaslog support", "yes");

if (PHP_SEASLOG != "no") {

    if (CHECK_HEADER_ADD_INCLUDE("SeasLog.h", "CFLAGS_SEASLOG", configure_module_dirname + "\\include;" + PHP_EXTRA_INCLUDES)) {

        seaslog_source_file="Performance.c \
            Analyzer.c \
            StreamWrapper.c \
            TemplateFormatter.c \
            ExceptionHook.c \
            Appender.c \
            Datetime.c \
            Logger.c \
            Buffer.c \
            ErrorHook.c \
            Request.c \
            Common.c"

        EXTENSION("seaslog", "seaslog.c");

        ADD_SOURCES(configure_module_dirname + "\\src", seaslog_source_file, "seaslog");

        ADD_FLAG("CFLAGS_SEASLOG", ' /I "' + configure_module_dirname + '" ');

	    AC_DEFINE("HAVE_SEASLOG", 1, "Have Seaslog Support");

    } else {
        WARNING("seaslog not enabled, headers not found");
    }
  
}

